import React, { Component } from 'react'
import {withRouter} from "react-router-dom"
class DefaultHeader extends Component {
    
    render() {
        const {title,right_text="",right_method=()=>console.log("嘿嘿嘿")} = this.props
        return (
            <div className="page-title">
                <span className="arrow arrow-left" onClick={()=>this.props.history.go(-1)}>&lt;</span>
                {title}
                <span className="arrow arrow-right" onClick={()=>right_method()}> {right_text}</span>
            </div>
        )
    }
}

export default withRouter(DefaultHeader)
